package basic_1020;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner scanner=new Scanner(System.in);
		
		int N=scanner.nextInt();
		int p=scanner.nextInt();

		List<Integer>nums=new ArrayList<Integer>();
		
		for(int i=0;i<N;i++) {
			nums.add(scanner.nextInt());
		}
		
		scanner.close();
		
		Collections.sort(nums);
		
		int maxCount=0;
		
		for(int i=0;i<N;i++) {
			long min_p=nums.get(i)*p;
			for(int j=i+maxCount;j<N;j++) {
				if(nums.get(j)<=min_p) {
					maxCount++;
					continue;
				}
				break;
			}
		}
		
		System.out.println(maxCount);
	}
}
